package com.sixth.controller;

import com.sixth.entity.Goods;
import com.sixth.entity.Outlibrary;
import com.sixth.entity.OutlibraryGoods;
import com.sixth.entity.Staff;
import com.sixth.service.StatisticsService;
import com.sixth.util.LayTab;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: project01
 * @description:
 * @author: 老范
 * @create: 2021-12-24 10:45
 **/
@RestController
@RequestMapping("chart")
public class StatisticsController {
    @Autowired
    private StatisticsService statisticsService;
    //商品销量排行
    @RequestMapping("output")
    public LayTab output(Goods goods,String start,String end,String value){
        return statisticsService.output(goods,start,end,value);
    }
    //各分店营销额
    @RequestMapping("sale")
    public LayTab sale(OutlibraryGoods outLibraryGoods, String start, String end, String value){
        return statisticsService.sale(outLibraryGoods,start,end,value);
    }
    //利润比
    @RequestMapping("sell")
    public List<Double> sell(OutlibraryGoods outLibraryGoods, String start, String end, String value){
        return statisticsService.sell(outLibraryGoods,start,end,value);
    }

}
